﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="CustomerContactSystem.Core" namespace="CustomerContactSystem.Core.Model">
    <class name="EnquiryDocument" table="EnquiryDocuments">
        <id name="Id">
            <generator class="native" />
        </id>
        <many-to-one name="Enquiry" class="Enquiry" not-null="true" foreign-key="FK_EnquiryDocuments_Enquiries"></many-to-one>
        <property name="DateAdded" not-null="true" />
        <many-to-one name="AddedBy" class="User" column="AddedById" not-null="true" lazy="false" fetch="join" foreign-key="FK_EnquiryDocuments_Users"></many-to-one>
        <property name="FileName" not-null="true" length="250" />
        <property name="DocumentName" not-null="true" length="150" />
        <property name="DocumentDescription" not-null="true" length="500" />
        <property name="DocumentType" not-null="true" length="10" />
    </class>
</hibernate-mapping>